package httpStatus

type ResCode int64

const (
	Success  ResCode = 200
	Notfound ResCode = 404
	Error    ResCode = 500
)

var codeMsgMap = map[ResCode]string{
	Success: "操作成功",
	Error:   "系统异常",
}

func (c ResCode) Msg() string {
	msg, ok := codeMsgMap[c]
	if !ok {
		msg = codeMsgMap[Error]
	}
	return msg
}
